package cn.qp.controller;

import cn.qp.service.AccountService;
import com.alibaba.fastjson.JSON;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Arrays;

/**
 * @author qipan
 * @date 2020/01/11 13:45
 */
@RestController
public class IndexController {

    @Autowired
    private AccountService accountService;

    @RequestMapping("/")
    public String show() {
        return JSON.toJSONString(accountService.getAllAccounts());
    }
}
